import { ElMessage } from "element-plus";
class message {
  success(message: string = 'message', showClose: boolean = true, duration: number = 1500): void {
    ElMessage({
      showClose,
      message,
      duration,
      type: "success"
    })
  }
  error(message: string = 'message', showClose: boolean = true, duration: number = 1500): void {
    ElMessage({
      showClose,
      message,
      duration,
      type: "error"
    })
  }
  warning(message: string = 'message', showClose: boolean = true, duration: number = 1500): void {
    ElMessage({
      showClose,
      message,
      duration,
      type: "warning",
    })
  }
}

export default new message();
